#ifndef PHYSICSCOMPONENT_H
#define PHYSICSCOMPONENT_H

#include <Ogre.h>
#include "Component.h"
#include "gameobjects/GameObject.h"

#include <btBulletDynamicsCommon.h>
#include "BtOgre/BtOgrePG.h"
#include "BtOgre/BtOgreGP.h"
#include "BtOgre/BtOgreExtras.h"

using namespace Ogre;

class PhysicsComponent :
			public Component
	{
	public:
		PhysicsComponent(ComponentContainer* c, const std::string& name);
		PhysicsComponent(btDynamicsWorld*, GameObject*);
		PhysicsComponent(btDynamicsWorld*, GameObject*, Real);
		PhysicsComponent(btDynamicsWorld*, GameObject*, Real, btCollisionShape*);
		PhysicsComponent(ComponentContainer* c, btDynamicsWorld*, ::Object params);
		virtual ~PhysicsComponent();
		
		void init();
		void update();
		
		virtual std::string toString(void) const { return "PhysicsComponent"; }
		
//	protected:
		GameObject* 		mGo;
		SceneNode*  		mNode;
		Entity*				mEntity;

		btDynamicsWorld* 	mWorld;
		btCollisionShape*	mShape;
		btRigidBody* 		mRigidBody;
	};

#endif // PHYSICSCOMPONENT_H
